package com.itheima.arrayListTest;

import java.util.ArrayList;

/**
 * @Author 王加鑫
 * @Date 2021/4/29 10:18
 * @Version 1.0
 */
public class StringListTest {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        String s1 = "迪丽热巴";
        String s2 = "古力娜扎";
        String s3 = "马儿扎哈";
        list.add(s1);
        list.add(s2);
        list.add(s3);

        list.add(0,"德玛西亚");
        list.remove("马儿扎哈");
        list.remove(0);
        System.out.println(list.get(0));
        list.set(1,"柳岩");
        System.out.println(list);
        System.out.println(list.size());


    }
}
